import Vue from 'vue'
import VueRouter from 'vue-router'
import LoginMode from '../components/LoginMode.vue'
import StudentLogin from '../components/Login/StudentLogin.vue'
import AdministratorLogin from '../components/Login/AdministratorLogin.vue'
// import StudentInterface from '../components/StudentPage/StudentInterface.vue'
import TeacherRoles from '../components/TeacherPage/TeacherRoles.vue'
import StudentMainPage from '../components/StudentPage/StudentMainPage.vue'

// 老师端登录
import TeacherLogin from '../components/Login/TeacherLogin.vue'
// 老师端密码登录界面
// 老师端验证码登录界面

// 老师端界面
import TeacherInterface from '../components/TeacherPage/TeacherInterface.vue'
// 老师端首页面
import TeacherMainPage from '../components/TeacherPage/TeacherMainPage.vue'
// 考试管理
import TeacherExamList from '../components/TeacherPage/ExaminationManagement/ExamList.vue'
import TeacherPublishExamination from '../components/TeacherPage/ExaminationManagement/PublishExamination.vue'
// 题库管理
import TeacherQuestionBatchImport from '../components/TeacherPage/QuestionBankManagement/BatchImport.vue'
import TeacherCreateTestQuestion from '../components/TeacherPage/QuestionBankManagement/CreateTestQuestion.vue'
import TeacherQuestionImportRecord from '../components/TeacherPage/QuestionBankManagement/ImportRecord.vue'
import TeacherQuestionList from '../components/TeacherPage/QuestionBankManagement/QuestionList.vue'
// 学生管理
import TeacherStudentBatchImport from '../components/TeacherPage/StudentManagement/BatchImport.vue'
import TeacherStudentList from '../components/TeacherPage/StudentManagement/StudentList.vue'
// 成绩分析
import TeacherScorAnalyse from '../components/TeacherPage/ScoreAnalyse.vue'
// 联合考试
import TeacherJoinedExamination from '../components/TeacherPage/JoinedExamination.vue'


// 管理员界面
import AdministratorInterface from '../components/AdministratorPage/AdministratorInterface.vue'
// 管理员首页内容
import AdministratorMainPage from '../components/AdministratorPage/AdministratorMainPage.vue'
// 学生批量导入
import AdministratorStudentBatchImport from '../components/AdministratorPage/StudentManagement/BatchImport.vue'
// 学生列表
import AdministratorStudentList from '../components/AdministratorPage/StudentManagement/StudentList.vue'
// 教师批量导入
import AdministratorTeacherBatchImport from '../components/AdministratorPage/TeacherManagement/BatchImport.vue'
// 教师列表
import AdministratorTeacherList from '../components/AdministratorPage/TeacherManagement/TeacherList.vue'

//帮帮学生
//下达通知
import TeacherPublishNotice from '../components/TeacherPage/HelpStudent/PublishNotice.vue'
//写通知
import TeacherPublishNoticeWrite from '../components/TeacherPage/HelpStudent/Publish/WriteNotice.vue'
// 已完成
import TeacherPublishNoticeFinished from '../components/TeacherPage/HelpStudent/Publish/Finished.vue'
// 草稿箱
import TeacherPublishNoticeDrafts from '../components/TeacherPage/HelpStudent/Publish/Drafts.vue'

//上传资料
import TeacherUploadData from '../components/TeacherPage/HelpStudent/UploadData.vue'

//交流社区
import Community from '../components/TeacherPage/Community.vue'




Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'LoginMode',
    component: LoginMode
  },
  {
    path: '/loginmode',
    name: 'LoginMode',
    component: ()=> import('../components/LoginMode.vue')
  },
  {
    path: '/studentlogin',
    name: 'StudentLogin',
    component: StudentLogin
  },
  {
    path: '/teacherlogin',
    name: 'TeacherLogin',
    component: TeacherLogin
  },
  {
    path: '/administratorlogin',
    name: 'AdministratorLogin',
    component: AdministratorLogin
  },
  {
    path: '/studentinterface',
    name: 'StudentInterface',
    component: ()=> import('../components/StudentPage/StudentInterface.vue'),
    children: [
      {
        path: '/studentmainpage',
        component: StudentMainPage
      }
    ]
  },
  {
    path: '/teacherinterface',
    name: 'TeacherInterface',
    component: TeacherInterface,
    children: [
      // 我的首页
      {
        path: '/teachermainpage',
        component: TeacherMainPage
      },
      // 考试管理
      {
        path: '/teacherexamlist',
        component: TeacherExamList
      },
      {
        path: '/teacherpublishexamination',
        component: TeacherPublishExamination
      },
      // 题库管理
      {
        path: '/teacherquestionbatchimport',
        component: TeacherQuestionBatchImport
      },
      {
        path: '/teachercreatetestquestion',
        component: TeacherCreateTestQuestion
      },
      {
        path: '/teacherquestionimportrecord',
        component: TeacherQuestionImportRecord
      },
      {
        path: '/teacherquestionlist',
        component: TeacherQuestionList
      },
      // 学生管理
      {
        path: '/teacherstudentbatchimport',
        component: TeacherStudentBatchImport
      },
      {
        path: '/teacherstudentlist',
        component: TeacherStudentList
      },
      // 成绩分析
      {
        path: '/teacherscoreanalyse',
        component: TeacherScorAnalyse
      },
      // 联合考试
      {
        path: '/teacherjoinedexamination',
        component: TeacherJoinedExamination
      },
      // 帮帮学生
      {
        path: '/teacherpublishnotice',
        component: TeacherPublishNotice,
        children: [
          {
            // 写通知
            path: '/teacherpublishnoticewrite',
            component: TeacherPublishNoticeWrite
          },
          {
            // 已发送
            path: '/teacherpublishnoticefinished',
            component: TeacherPublishNoticeFinished
          },
          {
            // 草稿箱
            path: '/teacherpublishnoticedrafts',
            component: TeacherPublishNoticeDrafts
          }
        ]
      },
      // 上传资料
      {
        path: '/teacheruploaddata',
        component: TeacherUploadData
      },
      // 交流社区
      {
        path: '/community',
        component: Community
      }
    ]
  },
  // 管理员界面
  {
    path: '/administratorinterface',
    name: 'AdministratorInterface',
    component: AdministratorInterface,
    children: [
      {
        //管理员首页
        path: '/administratormainpage',
        component: AdministratorMainPage
      },{
        //学生批量导入
        path: '/administratorstudentbatchimport',
        component: AdministratorStudentBatchImport
      },{
        // 学生列表
        path: '/administratorstudentlist',
        component: AdministratorStudentList
      },{
        // 老师批量导入
        path: '/administratorteacherbatchimport',
        component: AdministratorTeacherBatchImport
      },{
        // 教师列表
        path: '/administratorteacherlist',
        component: AdministratorTeacherList
      }
    ]
  },
  //教师权限角色——已删除
  {
    path: '/teacherroles',
    name: 'TeacherRoles',
    component: TeacherRoles
  }
]

const router = new VueRouter({
  routes
})

export default router
